Learn R Programming

sits (version 0.13.0)

`sits_labels<-`: Change labels of a sits tibble

Description

Given a sits tibble with a set of labels, renames the labels to the specified in value.

Usage

sits_labels(data) <- value

Arguments

data

A sits tibble.

value

A character vector used to convert labels. Labels will be renamed to the respective value positioned at the labels order returned by sits_labels.

Value

A sits tibble with modified labels.

Examples

Run this code
# NOT RUN {
# Read a set of time series with information on deforestation
data("samples_modis_4bands")
# Print the labels
sits_labels(samples_modis_4bands)
# Create a conversion list.
# relabel the data
sits_labels(samples_modis_4bands) <- c("Natural", "Natural",
                                       "Anthropic", "Anthropic")
# show the new labels
sits_labels(samples_modis_4bands)

# }

Run the code above in your browser using DataLab